package fun.ipconfig.shopping.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import fun.ipconfig.shopping.entity.Result;
import fun.ipconfig.shopping.entity.UserEntity;
import fun.ipconfig.shopping.service.UserService;


/**
 * @author gtl
 */
@RestController
@RequestMapping("/home")
public class HomePageController {
    @Autowired
    UserService userService;

    @GetMapping("/index")
    public Result index(){
        UserEntity user = userService.getCurrentLoginUser();
        System.out.println(user);
        return new Result().setMsg("ok").setStatus(200);
    }
}
